﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using TrabalhoLAP.Controller;
using TrabalhoLAP.Model;

namespace TrabalhoLAP.Views.Cadastro.Item
{
    public partial class ConsultarItem : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            
        }
        protected void consultarAluno_Click(object sender, EventArgs e)
        {
            MaintainItem maintainitem = new MaintainItem();
            ArrayList alunos = new ArrayList();

            string statusRegistro = ckbStatusRegistro.Checked == true ? "1" : "0";

            alunos = maintainitem.consultarItem(txbDrcItem.Text.ToString(), Convert.ToInt32(txbCodItem.Text.ToString()),
                                                 Convert.ToInt32(txbCodCategoria.Text), txbDrcCategoria.Text.ToString(), statusRegistro);

            if (alunos != null)
            {
                gdwResultadoConsulta.DataSource = alunos;
                gdwResultadoConsulta.DataBind();
            }
            else
            {
            }
        }
    }
}
